<?php

namespace app\admin\validate;

use think\Validate;

class VbotTemplate extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'code' => 'regex:^[a-zA-Z][a-zA-Z0-9_]*$',
    ];
    /**
     * 提示消息
     */
    protected $message = [
        'code.regex' => 'Code只能以字母开头',
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => [],
        'edit' => [],
    ];

}
